﻿using CommonLibrary.WFFile;
using DemountCIM.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DeMountCIM.Framework
{
    public enum MachineDef
    {
    }

    public enum RFIDDef
    {
        RFIDGateway1,
        RFIDGateway2,
        RFIDGatewayCount,

        RFID1,          // 脱胶机1
        RFID2,          // 脱胶机2
        RFID3,          // 树脂板码垛
        RFID4,          // 最终数据写入
        RFIDCount,
    }

    public class Def
    {

        #region // 系统字段


        /// <summary>
        /// 设备参数文件
        /// </summary>
        public const string MachineCfg = SysDef.MachineCfg;


        #endregion

        #region // 系统方法

        /// <summary>
        /// 获取设备当前运行方式：TRUE无硬件设备模拟运行，FALSE有硬件运行
        /// </summary>
        public static bool IsNoHardware()
        {
            return SysDef.IsNoHardware();
        }

        /// <summary>
        /// 获取当前相对路径的绝对路径
        /// </summary>
        /// <param name="relPath">相对路径</param>
        /// <returns></returns>
        public static string GetAbsPathName(string relPath)
        {
            return SysDef.GetAbsPathName(relPath);
        }


        public static string GetLanguageValue(string id) => ChangeLanguageService.GetLanguageValue(id);

        /// <summary>
        /// 获取设备当前语言
        /// </summary>
        public static SysDef.LanguagePack GetLanguage() => SysDef.GetCurLanguage();

        /// <summary>
        /// 设置设备当前语言
        /// </summary>
        public static bool SetLanguage(SysDef.LanguagePack language) => SysDef.SetCurLanguage(language);

        #endregion
    }

}
